﻿using System;
using System.IO;

namespace InterLock.Common
{
    public class TxtHelper
    {
        private static readonly string fileName = Directory.GetCurrentDirectory() + @"\operation.txt";
        public static void WriteTxt(string msg)
        {
            FileStream fileStream;
            if (!File.Exists(fileName))
            {
                fileStream = new FileStream(fileName, FileMode.Create);
                fileStream.Close();
            }

            using (StreamWriter sw = File.AppendText(fileName))
            {
                sw.WriteLine(DateTime.Now + "操作信息：  " + msg);
            }
        }
    }
}
